Initializing a variable to undefined
is unnecessary and should be avoided. A variable will automatically be set to
undefined
if you declare it without initialization, so the initialization code is redundant in this case.
var foo = undefined; // Noncompliant: replace with var foo;
let bar = undefined; // Noncompliant: replace with let foo;